package patterns.visitor.demo;


import patterns.visitor.elements.Circle;
import patterns.visitor.elements.Rectangle;
import patterns.visitor.elements.Shape;
import patterns.visitor.elements.Traingle;
import patterns.visitor.visitors.HorizontalReflectionProcessor;
import patterns.visitor.visitors.MoveProcessor;
import patterns.visitor.visitors.RotationProcessor;
import patterns.visitor.visitors.TransformationProcessor;
import patterns.visitor.visitors.VerticalReflectionProcessor;


public class VisitorDemo {
	
	public static void main(String[] args) {
	
		
		System.out.println(" ## Visitor Pattern Demo ##");
		Shape c = new Circle();
		Shape t = new Traingle();
		Shape r = new Rectangle();
		
		TransformationProcessor processor = new MoveProcessor();
		
		c.accept(processor);
		t.accept(processor);
		r.accept(processor);
		
		System.out.println("-----------------------------------");
		
		processor = new RotationProcessor();
		c.accept(processor);
		t.accept(processor);
		r.accept(processor);
		
		System.out.println("-----------------------------------");
		
		processor = new HorizontalReflectionProcessor();
		c.accept(processor);
		t.accept(processor);
		r.accept(processor);

		System.out.println("-----------------------------------");

		processor = new VerticalReflectionProcessor();
		c.accept(processor);
		t.accept(processor);
		r.accept(processor);
		
		
		
		
	}

}
